home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************
- * "sikcs.h"
- *-------------------------------------------------------------------------
- * Key customize library
- * Copyright (c) 1993, TaroPYON
- *************************************************************************/
-
- #ifndef _SIKCS_H
- #define _SIKCS_H
-
- #define KCS_HASH_MAX (32) /* ハッシュテーブルの数 */
- #define KCS_HASH(_ec) (((((unsigned short)(_ec))>>8)*31)&(KCS_HASH_MAX-1))
-
- typedef struct _kcskey_t
- {
- struct _kcskey_t *next;
- unsigned int att; /* 属性 */
- unsigned int ec; /* キーコード */
- int fncNo; /* 機能番号 */
- int (*func)();
- char *msg;
- } KCSKEY_T;
-
- #define KCSKEY_ATT_PFX (0x0000_0001)
-
- typedef struct _kcspfx_t
- {
- struct _kcspfx_t *next;
- unsigned int att; /* 属性 */
- unsigned int pfx; /* プレフィクスキー */
- unsigned int sfx; /* サーフィクスキー */
- int fncNo; /* 機能番号 */
- int (*func)();
- char *msg;
- } KCSPFX_T;
-
- typedef struct
- {
- unsigned int att; /* 属性 */
- unsigned int stt; /* ステータス */
- KCSKEY_T *key[KCS_HASH_MAX];
- KCSPFX_T *pfx[KCS_HASH_MAX];
- int fncNoPfx; /* プレフィクスキー機能番号 */
- int (*funcPfx)();
- } KCS_T;
-
- /* "kcs010.c" ----------------------------------------------------*/
- extern KCS_T *KCS_workAlloc(void);
- extern void KCS_workFree( KCS_T *kcs );
-
- /* "kcs011.c" ----------------------------------------------------*/
- extern KCSKEY_T *KCS_getKey( KCS_T *kcs, unsigned int ec );
- extern int KCS_setKey( KCS_T *kcs, KCSKEY_T *para );
-
- /* "kcs012.c" ----------------------------------------------------*/
- extern int KCS_setPfxCnf( KCS_T *kcs, int fncNo, int (*func)() );
- extern KCSPFX_T *KCS_getPfxKey( KCS_T *kcs, UINT pfx, UINT sfx );
- extern int KCS_setPfxKey( KCS_T *kcs, KCSPFX_T *para );
-
- /* "kcs013.c" ----------------------------------------------------*/
- extern void KCS_clear( KCS_T *kcs );
-
-
- #endif
-